import request from "@/utils/request";

export default {
  getRegistration(searchModel) {
    return request({
      url: "/registrations",
      method: "get",
      params: {
        status: searchModel.status,
        userName: searchModel.userName,
        eventName: searchModel.eventName,
        pageNo: searchModel.pageNo,
        pageSize: searchModel.pageSize,
      },
    });
  },
  // 批量同意报名
  batchApprove(ids) {
    return request({
      url: "/registrations/approve",
      method: "post",
      data: ids, // 通过请求体发送 ID 列表
    });
  },

  // 批量拒绝报名
  batchReject(ids) {
    return request({
      url: "/registrations/reject",
      method: "post",
      data: ids, // 通过请求体发送 ID 列表
    });
  },
};
